Change the test to polling instead of just a single sleep [main]#3112
Closed
joaopapereira wants to merge 4 commits intocloudfoundry:mainfrom
Closed
Change the test to polling instead of just a single sleep [main]#3112joaopapereira wants to merge 4 commits intocloudfoundry:mainfrom
joaopapereira wants to merge 4 commits intocloudfoundry:mainfrom
Conversation
9ebb964 to
586bd85
Compare
a-b
approved these changes
Aug 15, 2024
Member
a-b
left a comment
There was a problem hiding this comment.
Love this idea, let's see if this helps.
|
issue (blocking): I tried running this and found on occasion it failed, I think it's due to the order the apps can appear in the output. Sometimes APP2 comes first: The test may need to be changed to validate that both appear but not rely on the order of them. |
weresch
suggested changes
Aug 15, 2024
586bd85 to
69acaba
Compare
weresch
suggested changes
Aug 16, 2024
Comment on lines
+180
to
+183
| ContainSubstring(`%s\s+%s\s+create succeeded\s*\n`, appName1, bindingName1), | ||
| ContainSubstring(`%s\s+%s\s+create succeeded\s*\n`, appName2, bindingName2), | ||
| )) |
There was a problem hiding this comment.
Suggested change
| ContainSubstring(`%s\s+%s\s+create succeeded\s*\n`, appName1, bindingName1), | |
| ContainSubstring(`%s\s+%s\s+create succeeded\s*\n`, appName2, bindingName2), | |
| )) | |
| )) | |
| sessionContents := string(session.Out.Contents()) | |
| Expect(strings.Contains(sessionContents, fmt.Sprintf(`%s %s create succeeded`, appName1, bindingName1))).To(BeTrue()) | |
| Expect(strings.Contains(sessionContents, fmt.Sprintf(`%s %s create succeeded`, appName2, bindingName2))).To(BeTrue()) |
There was a problem hiding this comment.
I found the test can fail if app2 is listed first. If we get the session contents and search it for substrings the order doesn't matter.
589b428 to
16ec389
Compare
2e4ad12 to
0e35f04
Compare
0e35f04 to
1f75b01
Compare
- Avoid flakyness due to time it takes to bind a service Signed-off-by: João Pereira <joaod@vmware.com>
1f75b01 to
c474fbb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change